﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace SevenInvaders.LEVEL_PEDRO
{
    /// <summary>
    /// Classe inmigo xc;,mnn vvv , ,nv
    /// </summary>
    class PedroRenatoEnemy : Enemy
    {
        public static List<PedroRenatoEnemy> list = 
            new List<PedroRenatoEnemy>();

        Vector2 position;

        int velocidade;

        Random random;

        public int randomNumber;

        Texture2D texture;

        int numeroParaTexInimigo;

        public int vida = 1;

        public PedroRenatoEnemy(Texture2D texture, Vector2 position, GameWindow gameWindow, ContentManager Content)
            : base(texture)
        {
            this.Position = position;
            velocidade = 5;

            random = new Random();

            this.texture = texture;

            texture = Content.Load<Texture2D>("LEVEL_PEDRO/asteroide1");
                     

        }

        public void Update(GameTime gameTime)
        {
            this.PositionY += velocidade;

            if (vida == 0)
            {
                vida = 1;
                this.PositionX = randomNumber;
                this.PositionY = 0 - this.Texture.Height;
            }

            if (this.PositionY >= 600)
            {
                this.PositionY = 0 - this.Texture.Height;
                this.PositionX = randomNumber;
                
            }
            
            randomNumber = random.Next(0, 801 - this.Texture.Width);

           // numeroParaTexInimigo = random.Next(0, 5);



        }

    }
}
